home *** CD-ROM | disk | FTP | other *** search
- package sub_arctic.lib;
-
- import sub_arctic.output.drawable;
- import sub_arctic.lib.top_level;
-
- import java.applet.Applet;
- import java.awt.Graphics;
- import java.awt.Event;
- import java.awt.Point;
- import java.awt.Dimension;
- import java.awt.Rectangle;
-
- /**
- * This is subclass of interactor applet that inserts a debugging lens
- * above its normal subtree (using a debug_lens_top_level object with
- * a fake_top_level child). This object can be temporarily substituted
- * for a normal interactor_applet for debugging purposes. By default,
- * the debug_lens_top_level object will activate/deactivate its lens when
- * a mouse button is pressed while holding down both the control and meta
- * keys (but this can be changed).
- *
- * @author Scott Hudson
- */
- public class debug_interactor_applet extends interactor_applet {
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * Construct a new debug_interactor_applet.
- */
- public debug_interactor_applet()
- {
- super();
- }
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /** The fake top_level object object that is placed below the real root and
- * passed to the user's build_ui() routine. This is initialized when
- * we establish the top level interactor in make_top_level().
- */
- protected fake_top_level _fake_top = null;
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * This function is called to create and install a top_level
- * interactor in this applet. In this case we install a
- * debug_lens_top_level with a fake_top_level under it. This fake_top_level
- * is what eventually gets passed into build_ui() (via init()).
- *
- */
- public void make_top_level()
- {
- /* build the debugging root and install it */
- debug_lens_top_level dtop =
- new debug_lens_top_level(0, 0, size().width, size().height);
- set_top_interactor(dtop);
-
- /* build the fake root under that */
- _fake_top = new fake_top_level(dtop);
- }
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /**
- * Override do_init to pass the fake top_level object to the user's
- * build_ui() routine instead of the real one.
- */
- public void do_init()
- {
- manager.register_awt_component(this);
-
- make_top_level(); // install it in the applet
- pre_build_ui();
- build_ui(_fake_top); // build the UI with the fake root
- post_build_ui(_fake_top);
- }
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- }
- /*=========================== COPYRIGHT NOTICE ===========================
-
- This file is part of the subArctic user interface toolkit.
-
- Copyright (c) 1996 Scott Hudson and Ian Smith
- All rights reserved.
-
- The subArctic system is freely available for most uses under the terms
- and conditions described in
- http://www.cc.gatech.edu/gvu/ui/sub_arctic/sub_arctic/doc/usage.html
- and appearing in full in the lib/interactor.java source file.
-
- The current release and additional information about this software can be
- found starting at: http://www.cc.gatech.edu/gvu/ui/sub_arctic/
-
- ========================================================================*/
-